﻿@using LyyCMS.Web.Startup
@using LyyCMS.Web.Models.WeChat
@model WeChatAccountViewModel

@{
    ViewBag.Title = L("WeChatAccount");
    ViewBag.CurrentPageName = PageNames.WeChatAccount;
}
@section scripts
    {
<environment names="Development">
    <script src="~/view-resources/Views/WeChat/Account.js" asp-append-version="true"></script>
</environment>

<environment names="Staging,Production">
    <script src="~/view-resources/Views/WeChat/Account.min.js" asp-append-version="true"></script>
</environment>
}

<section class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">
                <h1>@L("WeChatAccount")</h1>
            </div>
            <div class="col-sm-6">
                <a href="javascript:;" data-toggle="modal" data-target="#WxAccountCreateModal" class="btn bg-blue float-sm-right">
                    <i class="fa fa-plus-square"></i>
                    @L("Create")
                </a>
            </div>
        </div>
    </div>
</section>
<div>
    @if (null != Model.siteList)
    {
        <select>
            @foreach (var site in Model.siteList)
            {
                <option name="@site.Id">@site.siteName</option>
            }
        </select>
    }

</div>
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <div class="row">
                            <div class="col-md-6">
                                <!--Use for bulk actions-->
                            </div>
                            <div class="col-md-6">
                                @await Html.PartialAsync("~/Views/WeChatAccount/Index.AdvancedSearch.cshtml")
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table id="WxAccountTable" class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th>@L("Name")</th>
                                        <th>@L("AppId")</th>
                                        <th>@L("Originalid")</th>
                                        <th style="width: 250px">@L("Actions")</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

@await Html.PartialAsync("~/Views/WeChatAccount/_CreateModal.cshtml", Model)

<div class="modal fade" id="WxAccountEditModal" tabindex="-1" role="dialog" aria-labelledby="WxAccountEditModalLabel" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
        </div>
    </div>
</div>
